package com.hui.qiniucloud.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 聊天会话响应DTO
 */
@Data
@Schema(description = "聊天会话响应")
public class ChatSessionResponse {

    @Schema(description = "会话ID", example = "1")
    private Long id;

    @Schema(description = "会话标题", example = "关于魔法的讨论")
    private String title;

    @Schema(description = "最后一条消息内容", example = "那魔法学校是什么样的呢？")
    private String lastMessage;

    @Schema(description = "消息数量", example = "5")
    private Integer messageCount;

    @Schema(description = "角色信息")
    private CharacterInfo character;

    @Schema(description = "创建时间")
    private LocalDateTime createdTime;

    @Schema(description = "更新时间")
    private LocalDateTime updatedTime;

    @Data
    @Schema(description = "角色信息")
    public static class CharacterInfo {
        @Schema(description = "角色ID", example = "harry_potter")
        private String id;

        @Schema(description = "角色名称", example = "哈利·波特")
        private String name;

        @Schema(description = "角色头像", example = "https://img.qiniucdn.com/avatar/harry.jpg")
        private String avatar;
    }
}